package com.zj.osm.view.map.line

import com.zj.osm.entity.greendao.Line
import com.zj.osm.entity.greendao.Point
import com.zj.osm.mvp.BasePresenter


/**
 * @author jiang zhu on 2019/10/30
 */
class LineActivityPresenter : BasePresenter<LineActivityView>(){

    private var lineActivityModel : LineActivityModel = LineActivityModel()

    fun initData(lineId: Long) {
        val line : Line = lineActivityModel.getLine(lineId)
        val point1 : Point = lineActivityModel.getPoint1(line)
        val point2 : Point = lineActivityModel.getPoint2(line)
        if (view != null) {
            view.initData(line,point1,point2)
        }
    }


}